<!DOCTYPE html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml" xmlns:v-model="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>12demo</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>

<div id="app">
    <introduce> v-bind:title="msg"</introduce>
</div>
<script type = "text/javascript">

    //定义组件
    const introduce = {
        template:"<h2>Hello component{{title}}</h2>",
        data(){
            return{title:"introduce"}
        }
    }

    //注册组件
    Vue.component("introduce",introduce)

    var app=new Vue({
         el:"#app",
        data:{
             msg:"组件通讯内容msg"
        },

    })
</script>
</body>
</html>